        <link rel="stylesheet" type="text/css" href="<?php echo base_url()?>/public/assets/css/lesson.css">
        
        <style>
        .click{width:96%;padding:2% 0;margin:2% auto;border-top:1px dotted #E5E5E5}
        .weui_cells_title{margin-top:.3em}
        </style>
        <div class="weui_navbar">
            <div class="weui_navbar_item <?php if(empty($type) || $type == 0 )echo 'weui_bar_item_on'?>" onclick="tiaozhuan(0);">
                全部
            </div>
            <div class="weui_navbar_item <?php if($type == 1)echo 'weui_bar_item_on'?>" onclick="tiaozhuan(1);">
                等待上课
            </div>
            <div class="weui_navbar_item <?php if($type == 2)echo 'weui_bar_item_on'?>" onclick="tiaozhuan(2);">
                已下课
            </div>
        </div>
        
        <ul style="display: block;">
        <?php if($book_list){?>
        <?php foreach ($book_list as $val){?>
            <li>
                <a href="javascript:void(0);" class="weui_media_box weui_media_appmsg">
                    <div class="weui_media_hd">
                        <img class="weui_media_appmsg_thumb" src="<?php echo $val['book_logo']?>" alt="">
                    </div>
                    <div class="weui_media_bd">
                        <h4 class="weui_media_title"><?php echo $val['book_title']?>
                         <?php if($val['status'] == 0){?>
                         <em class="wait">等待上课</em>
                         <?php }elseif ($val['status'] == 1 || $val['status'] == 5){?>
                         <em class="wait">上课中</em>
                         <?php }elseif ($val['status'] == 2 || $val['status'] == 6){?>
                         <em class="done">已下课</em>
                         <?php }elseif ($val['status'] == 3){?>
                         <em class="done">已结束</em>
                         <?php }?>
                        </h4>
                    </div>
                </a>
                <a class="weui_cell" href="javascript:;">
                    <div class="weui_cell_hd"><img src="<?php echo $val['baby_avatar']?>" alt="" style="width:40px;margin-right:5px;display:block"></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p><?php echo $val['baby_name']?></p>
                    </div>
                    <span class="weui_cell_ft"></span>
                </a>
                <div class="weui_media_box weui_media_text">
                    <p class="weui_media_desc"><?php echo $val['book_date']?>（<?php echo $weekArr[date('w',strtotime($val['book_date']))]?>）<?php echo $val['book_date_start']?></p>
                    <p class="weui_media_desc"><?php echo $val['address']?></p>
                </div>
                <div class="click">
                
                <?php if($val['status'] == 1 || $val['status'] == 5){?>
                <a href="javascript:classover(<?php echo $val['book_id']?>);" class="weui_btn weui_btn_mini weui_btn_default classover">确认下课</a>
                <?php }?>
                               
                <a href="/tcourserecord/courseinfo?book_id=<?php echo $val['book_id']?>" class="weui_btn weui_btn_mini weui_btn_default detial">查看详情</a>
                </div>
            </li>
        <?php }?>
        <?php }else{?>
        <li>
            <a href="javascript:void(0);" class="weui_media_box weui_media_appmsg">
                <p style="margin-left: 35%;">没有约课记录</p>
            </a>
        </li>
        <?php }?>
        </ul>
        
        <div class="weui_dialog_confirm" id="dialog1" style="display: none;">
            <div class="weui_mask"></div>
            <div class="weui_dialog">
                <div class="weui_dialog_hd"><strong id='dialog1_content' class="weui_dialog_title"></strong></div>
                <div class="weui_dialog_ft">
                    <a href="javascript:$('#dialog1').hide();" class="weui_btn_dialog default">取消</a>
                    <a href="javascript:;" id="dialog1_a" class="weui_btn_dialog primary">确定</a>
                </div>
            </div>
        </div>

        
    <script type="text/javascript">
        //跳转
        function tiaozhuan(type){
        	window.location.href="/tcourserecord/?type="+type;
        }

        //下课
        function classover(book_id){
            $('#dialog1_content').html('已经上完课了吗？');
            $('#dialog1_a').attr('href','/tcourserecord/classover?book_id='+book_id);
            $('#dialog1').show();
        }
    </script>
